package com.danco.training.hoteladmin.storage;

import java.util.Comparator;
import com.danco.training.hoteladmin.core.Room;

public class RoomSortByCapacity implements Comparator<Room> {
	@Override
	public int compare(Room o1, Room o2) {		
		if(o1.getCapacity() > o2.getCapacity()) {
            return 1;
		}
		else if(o1.getCapacity() < o2.getCapacity()) {
            return -1;
		}
		else {
            return 0;
		}
	}
 }
